<?php
// +----------------------------------------------------------------------
// | tpapi.
// +----------------------------------------------------------------------
// | FileName: Route.php
// +----------------------------------------------------------------------
// | Author: King east <1207877378@qq.com>
// +----------------------------------------------------------------------


namespace ke\thinkApi\src\traits;


use think\facade\Route;
use think\route\RuleItem;

trait TraitRoute
{
    /**
     * @param string $name
     * @param string $method
     * @param callable $callback
     * @return RuleItem
     */
    protected function regRoute($name, $method, $callback)
    {
        return Route::rule($this->setting->version . '/' . $name . '$', $callback, $method);
    }
}
